import React from 'react'

import './NavHeader.scss'
import jsinvoke from 'component/jsapi.js'

class NavHeader extends React.Component {
    goBack(){
        jsinvoke({
            cmd: 'goBack',
            data: {}
        })
    }
    render() {
        return ( 
            <div className='nav'>
              <div onClick={() => this.goBack()} className="back-icon"></div>
              <h4 className="title">{this.props.title}</h4>
            </div>
        )
    }
}

export default NavHeader